$(function () {
    findAllHome();
});

function findAllHome() {
    let data = myAjax("/home", {}, "get");
    console.log(data);
    setNewsData(data.newsModelList);
}

function setNewsData(data) {
    let html = '';
    for (let i = 0; i < data.length; i++) {
        html += '<div>\n' +
            '                        <div>' + data[i].title + '</div>\n' +
            '                        <div>' + data[i].content + '</div>\n' +
            '                    </div>';
    }
    $("#newsHtml").html(html);
}